<?php
class AppController extends Controller{
    var $helpers=array('Form','Html','Session');

    
    function checkUser(){  
        $user = $this->Session->read('User');  
  
        if(empty($user)) {   
   
            $this->Session->setFlash('ERROR: You must be logged to access the admin area.');   
  
            $this->redirect(array('action'=>'login', 'controller'=>'users'));   
        }
    }  

    
}
?>
